<!DOCTYPE html>
<!--
Copyright 2015 Pivotal Software, Inc..

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
    <head>
        <title>登录</title>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <script type="text/javascript" src="/static/javascript/jquery-1.11.3.min.js"></script>
        <script type="text/javascript" src="/static/javascript/semantic.min.js"></script>
        <script type="text/javascript" src="/static/javascript/smarterlife.js"></script>

        <link rel="stylesheet" type="text/css" href="/static/css/components/reset.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/site.css" />

        <link rel="stylesheet" type="text/css" href="/static/css/components/container.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/grid.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/header.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/image.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/menu.css" />

        <link rel="stylesheet" type="text/css" href="/static/css/components/divider.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/segment.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/form.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/input.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/button.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/list.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/message.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/components/icon.css" />

        <link type="text/css" href="/static/css/semantic.min.css" rel="stylesheet" />
        <link type="text/css" href="/static/css/smarterlife.css" rel="stylesheet" />
    </head>
    <body>
        <div id="login" class="ui middle aligned center aligned grid">
            <div class="column">
                <div class="ui teal image header">
                    <img alt="logo" src="/static/images/logo.png" class="image" />
                    <span class="content">用户登录</span>
                </div>
                <form id="login-form" class="ui form" th:action="@{/user/login}" method="post" autocomplete="off">
                    <div class="ui stacked segment">
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" name="username" placeholder="用户名/邮箱/手机号" />
                            </div>
                        </div>
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="lock icon"></i>
                                <input type="password" name="password" placeholder="密码" />
                            </div>
                        </div>
                        <div class="ui fluid large teal submit button">登录</div>
                    </div>
                    <div class="ui error message"></div>
                    <div class="ui error message visible" th:if="${param.error}">无效的用户名或者密码</div>
                </form>
                <div class="ui message">
                    <a th:href="@{/user/forget}">忘记密码？</a>
                    <a th:href="@{/user/register}">注册</a>
                </div>
            </div>
        </div>
    </body>
</html>
